package controllers;

import java.util.List;

import javax.inject.Inject;

import models.Updates;
import play.mvc.Controller;
import play.mvc.With;
import services.UpdatesService;

@With(Secure.class)
public class News extends Controller{
    @Inject
    private static UpdatesService updatesService;
    
    public static void index() {
        List<Updates> news =  updatesService.getNewsByUser(Secure.Security.connected());
        render(news);
    }
    
    public static void ajax() {
        render();
    }
}